<template>
	<view class="global">
		<view>
			<image style="width: 400px; height: 160px;" :src="meetRoomData.image"></image>
		</view>
		<view>
			<view>
				<uni-section title-color="#2979ff" title="位置">
					<template v-slot:right>
						<text class="Text">{{meetRoomData.location}}</text>
					</template>
				</uni-section>
			</view>
			<view class="line2"></view>
			<view>
				<uni-section title-color="#2979ff" title="状态">
					<template v-slot:right>
						<text class="Text">{{meetRoomData.status}}</text>
					</template>
				</uni-section>
			</view>
			<view class="line2"></view>
			<view>
				<uni-section title-color="#2979ff" title="描述">
					<template v-slot:right>
						<text class="Text">{{meetRoomData.description}}</text>
					</template>
				</uni-section>
			</view>
			<view class="line2"></view>
		</view>
	</view>
</template>

<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app';
	import {
		ref
	} from 'vue';
	import {
		getMeetRoomOne
	} from '@/api/room.js';
	import {share} from '@/utils/share.js';

	const meetRoomData = ref({});
	onLoad(async (option) => {
		share();
		//根据id获取会议室
		await getMeetRoomOne(option.id).then(res => {
			if (res.code === 200) {
				meetRoomData.value = res.data;
			}
		});
	});
</script>

<style scoped lang="scss">
	.global {
		background-color: white;
		height: 100vh;
	}

	.line2 {
		height: 1px;
		background: #DCDCDC;
	}

	.Text {
		color: #A9A9A9;
		font-size: 14px;
	}
</style>